<?php
@ini_set( "max_execution_time", "660" );
include( dirname(__FILE__).'/j15comp.php');
     
function com_install() {
	global $mosConfig_absolute_path, $mosConfig_dbprefix, $mainframe, $database; 
	
	if(!class_exists('PclZip')){
include($mosConfig_absolute_path . '/administrator/components/com_oscommerce/pclzip.lib.php');
		//include($mosConfig_absolute_path .'/administrator/components/com_test/ziplib.php');
}
	
		@chmod("$mosConfig_absolute_path/components/com_oscommerce", 0777); 
		@chmod("$mosConfig_absolute_path/components/com_oscommerce/catalog.zip", 0777);	
		@chmod("$mosConfig_absolute_path/administrator/components/com_oscommerce", 0777); 
		@chmod("$mosConfig_absolute_path/administrator/components/com_oscommerce/catalog.zip", 0777);
	
	
  $archive = new PclZip($mosConfig_absolute_path .'/administrator/components/com_oscommerce/admin.zip');
$list = $archive->extract(PCLZIP_OPT_PATH, $mosConfig_absolute_path ."/administrator/components/com_oscommerce/",PCLZIP_OPT_SET_CHMOD, 0777);
  if ($list == 0) {
    die ("Error  : '".$archive->errorInfo(true)."'");
  }
  
  
   $archive2 = new PclZip($mosConfig_absolute_path .'/components/com_oscommerce/catalog.zip');
$list2 = $archive2->extract(PCLZIP_OPT_PATH, $mosConfig_absolute_path ."/components/com_oscommerce/",PCLZIP_OPT_SET_CHMOD, 0777);
  if ($list2 == 0) {
    die ("Error  : '".$archive->errorInfo(true)."'");
  }
@unlink($mosConfig_absolute_path .'/components/com_oscommerce/catalog.zip');
@unlink($mosConfig_absolute_path .'/administrator/components/com_oscommerce/admin.zip');

//Depreciated:::

?>
<center>
<table width = "100%" border = "0">
<tr><td width = "10%"></td>
<td width = "90%">
<p>
<strong>ECJC Online Shop 1.2.1RC1</strong> Component <em>for Joomla! CMS</em>
<br/> &copy; 2006 - 2007 by Joomla-Host
<br />
All rights reserved.
<br/><br/> This Joomla!  Component has been released under the <a href = "index2.php?option=com_admisc&amp;task=license">GNU/GPL</a>.
<br/> <strong>Note:</strong> This component is based on osCommerce Milestone 2.2RC2a
<br/><strong><br/> </u>
</p></td>
<tr>
<td>
</td>
 <td><strong><code>I N S T A L L :</code></strong>
<br/><br/>
<ul>
    <li>            STEP 1 : <font color = "Green">Succesfull</font><br>
    <strong>If using Joomla 1.5.xxx please make sure the joomla file edits are done before installeing com_ecjc_lang:</strong>

                </li>
    <li>            STEP 2 : Install com_ecjc_lang1xx via the joomla component Installer
                </li>>
    <li>            STEp 3 : Install / Upgrade Database Tables (this will appear when you complete STEP 2
         </li>
     </ul>      
    </td>
  </tr>
    </table>
</center>
<?php
}
?>
